import request from '/@/utils/request';

/**
 *  广告管理所有api在此！
 */

//---- 广告管理 -----
// 列表
export const advertisementPage = (data?: any) => {
	return request({
		url: '/advertisement/page',
		method: 'post',
		data,
	});
}

// 新增
export const advertisementCreate = (data: any) => {
	return request({
		url: '/advertisement/create',
		method: 'post',
		data,
	});
};

// 编辑
export const advertisementUpdate = (data: any) => {
	return request({
		url: '/advertisement/update',
		method: 'post',
		data,
	});
};

// 删除
export const advertisementDelete = (params?: object) => {
	return request({
		url: '/advertisement/delete',
		method: 'get',
		params,
	});
};

// 广告详情
export const advertisementDetail = (params?: object) => {
	return request({
		url: '/advertisement/detail',
		method: 'get',
		params,
	});
};

// 查询各状态数量
export const advertisementCount = (data: any) => {
	return request({
		url: '/advertisement/count',
		method: 'post',
		data,
	});
};